package com.luo.chengrui.module.sa.service.role;

import java.util.*;
import javax.validation.*;

import com.luo.chengrui.module.sa.controller.admin.role.vo.*;
import com.luo.chengrui.module.sa.dal.dataobject.role.PermissionDO;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import com.luo.chengrui.module.sa.dal.dataobject.role.PermissionViewDO;

/**
 * 角色菜单权限 Service 接口
 *
 * @author 诚睿
 */
public interface PermissionService {

    void assignRoleMenu(String roleId, Set<Long> menuIds);

    Set<Long> getRoleMenuListByRoleIds(Collection<String> roleIds);

    List<PermissionViewDO> getRoleMenuListByRoleIds(List<String> roleIds);

    List<PermissionViewDO> getRoleMenuListByRoleIdFromCache(String roleId);

    /**
     * 根据fullId查询权限
     *
     * @param fullId
     * @return
     */
    List<PermissionViewDO> getMenuListByOrgFullId(String fullId);


    public List<String> getPersonPermissionCodeListBySystemUserIdFromCache(Long userId);

    boolean hasAnyPermissions(Long userId, String... permissions);

}
